package com.dao;

import com.model.Orders;
import com.vo.*;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @Author: chihaojie
 * @Date: 2019/6/22 16:17
 * @Version 1.0
 * @Note
 */

@Repository
public interface StatisticMapper {


    List<Orders> selectAgentWholeSaleStatisticByStarttimeAndEndtime(@Param("agent") String businessId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<Orders> selectSingleDeviceSaleStatisticByStarttimeAndEndtime(@Param("agent")String businessId,@Param("deviceId")Long deviceId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<Orders> selectAgentSingleHospitalDaySaleStatisticByStarttimeAndEndtime(@Param("agent")String businessId,@Param("hospitalId") Long hospitalId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<Orders> selectAgentProductSKUSaleStatisticByStarttimeAndEndtime(@Param("agent")String businessId,@Param("productId") Long productId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    ProductSKUSaleVO selectAgentSingleProductSaleByStarttimeAndEndtime(@Param("agent")String businessId,@Param("productId") Long productId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<ProductSKUSaleVO> selectAgentAllProductSaleByStarttimeAndEndtime(@Param("agent")String businessId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<SingleDeviceSaleVO> seAgentAllDeviceSaleByStarttimeAndEndtime(@Param("agent") String businessId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    SingleDeviceDaySaleVO selectAgentSingleDeviceSaleByStarttimeAndEndtime(@Param("agent")String businessId,@Param("deviceId")Long deviceId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    List<SingleHospitalSaleVO> seAgentAllHospitalSaleByStarttimeAndEndtime(@Param("agent") String businessId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);

    SingleHospitalDaySaleVO selectAgentSingleHospitalSaleByStarttimeAndEndtime(@Param("agent")String businessId,@Param("hospitalId")Long hospitalId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    WholeDailySaleVO selectAgentSaleStatisticByStarttimeAndEndtime(@Param("agent") String businessId, @Param("startTime") Date startTime,@Param("endTime") Date endTime);
}
